package com.anne.fish.webapp.action.usercenter;

import java.math.BigDecimal;

import com.anne.fish.webapp.action.UserCenterBaseAction;

/**
 * Action for facilitating User Management feature.
 */
public class MyInfoAction extends UserCenterBaseAction {
	private static final long serialVersionUID = 6776558938712115191L;
	
	private int creditScore = 0;

	private int creditLevel = 1;
	
	private int userScore = 0;
	
	private int balance = 0;
	
	private String authMail = "邮件未验证";
	private String authMailCss = "sjyzw";
	private String authMobile = "手机未验证";
	private String authMobileCss = "maileyzw";
	private String authRealname = "实名未验证";
	private String authRealnameCss = "nameyzw";
	private String authBiz = "营业执照未验证";
	private String authBizCss = "zzyzw";
	
	public String getAuthMailCss() {
		return authMailCss;
	}


	public String getAuthMobileCss() {
		return authMobileCss;
	}


	public String getAuthRealnameCss() {
		return authRealnameCss;
	}


	public String getAuthBizCss() {
		return authBizCss;
	}


	public String getAuthMail() {
		
		authMailCss = "sjyz";
		authMail = "邮件已验证" ;
		
		return authMail;
	}


	public String getAuthMobile() {
		return authMobile;
	}


	public String getAuthRealname() {
		return authRealname;
	}


	public String getAuthBiz() {
		return authBiz;
	}


	public int getBalance() {
		
		this.balance = 100;
		
		return balance;
	}


	public int getUserScore() {
		
		this.userScore = 100;
		
		return userScore;
	}

	@Override
	public void prepare() throws Exception {

		super.prepare();
		this.getCreditLevel();

	}

	public int getCreditLevel() {

		this.creditScore = 100;

		creditLevel = new BigDecimal((Math.sqrt((creditScore + 20) / 5) - 2))
				.setScale(0, BigDecimal.ROUND_HALF_UP).intValue();

		return creditLevel;
	}

	public String infoAll() {

		return SUCCESS;
	}

	public String infoCheck() {

		return SUCCESS;
	}

	public String infoManage() {

		return SUCCESS;
	}

	public String infoDelete() {

		return SUCCESS;
	}

}
